<@admin.html >
<div class="title">
<h1>添加广告</h1>
	<span class="tTip">标注"<em>*</em>"为必填项</span>
</div>
<div class="box">
	<div class="inner">
		<div class="tx_table">
			<h2>编辑广告</h2>
			<form name="saveForm" id="saveForm" action="${base}/admin/adv/index!save" method="post">
				<#if (advertisement??)&&(advertisement.id??)><input type="hidden" name="advertisement.id" value="${(advertisement.id?c)!}"/></#if>
			<div class="data">
				<table>
					<colgroup width="24%"></colgroup>
					<tbody>
						<tr>
							<th>广告位简称：</th>
							<td>
								<input class="Q" type="text" name="advertisement.bannerTitle" id="bannerTitle" size="32" value="${(advertisement.bannerTitle)!}"/>
								<span id="bannerTitleTip"></span>
							</td>
						</tr>
						<tr>
							<th>广告位代码：</th>
							<td>
								<input class="Q" type="text" name="advertisement.code" id="code" size="32" value="${(advertisement.code)!}"/>
								<span id="codeTip"></span>
							</td>
						</tr>
						<tr>
							<th>详细内容：</th>
							<td><div id="advertisement.content"><textarea name="advertisement.content">${(advertisement.content)!}</textarea></div></td>
						</tr>
					</tbody>
				</table>
				<div class="tx_sender">
						<input class="step" type="submit" value="保 存" />
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$.formValidator.initConfig({formid:"saveForm",onerror:function(msg){},onsuccess:function(){return true;}});					
		$("#bannerTitle")
		.formValidator({onshow:"请输入广告位简称",onfocus:"请输入广告位简称",oncorrect:"广告位简称正确"})
		.inputValidator({min:2,max:100,onerror:"广告位简称为2-100位字符,1个汉字算2位字符,请确认"});
		$("#code")
		.formValidator({onshow:"请输入广告位代码",onfocus:"请输入广告位代码",oncorrect:"广告位代码正确"})
		.inputValidator({min:6,max:10,onerror:"6-10位字符,请确认"})
		.regexValidator({regexp:"username",datatype:"enum",onerror:"用户名格式不正确(6 - 10个字符,只包括字母、数字、下划线)"});
	});
	
</script>
<script type="text/javascript">
	window.onload = function() {	
		var oFCKeditor = new FCKeditor( 'advertisement.content' ) ;
		oFCKeditor.BasePath = "${statics}/plugins/editor/fckeditor/"
		oFCKeditor.ReplaceTextarea() ;
	}
</script>
</@admin.html >